<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="menu_books_label1" var="menu_books_label1"/>
<fmt:message key="menu_books_label2" var="menu_books_label2"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<link rel="StyleSheet" href="../../scripts/dtree/dtree.css" type="text/css"/>
<script type="text/javascript" src="../../scripts/dtree/dtree.js"></script>  
<br>
<c:if test="${not empty booksTypes}">
<TABLE class=leftColumnModuleHead cellSpacing=0 cellPadding=0 
  width="100%" border=0 valign="top">
  <TBODY>
  <TR>
    <TH class="menu_title_left" width=48>&nbsp;</TH>
    <TH class="menu_title_middle">${menu_books_label1}</TH>
    <th width="48" align="right" class="menu_title_right"></th>
   </TR>  
  </TBODY>
</TABLE>
<TABLE class=subMenu cellSpacing=0 cellPadding=0 width="100%">
	<TBODY>
	<tr><td>	
	<div class="dtree" style="width:200px;overflow-x:auto;">
	<script type="text/javascript">
		d = new dTree('d');	
		d.add(0,-1,'${menu_books_label2}');
		d.selected = ${empty param.id?0:param.id};
		<c:forEach var="booksType" items="${booksTypes}">
			d.add('${booksType.id}','${booksType.superiorId}','${booksType.typename}','<c:url value="/modules/books/booksBorrow.do?method=list&typeId=${booksType.id}&superiorId=${booksType.superiorId}&booksType=true"/>','${booksType.typename}','_parent');	
		</c:forEach>
		document.write(d);
	</script>
	<br>
	<br>
	</div>
	</td></tr>	
	</TBODY>
</TABLE>
</c:if>